Run a Model
Each of the models within the FMSF have different required and optional files that are needed to complete model run requests. The following Request Body sections outline what the file types are. For specific details about the files see Model Input Details.
API Endpoint
API Endpoint
POST /model/run
Example Request
Only the required parameters need to be included. For example, if the Ignition ID or Barrier ID are not required for a specific model they can be left out of the cURL; however, if they are included, they will be ignored.
curl -X POST "https://fmsf.firenet.gov/fmsfModelREST/model/run" -H "accept: text/plain" -H "Authorization: Basic <basic64 encoded username:API key>" -H "Content-Type: multipart/form-data" -F "Model Type=<Model Type>" -F "Landscape ID=<GeoTIFF ID>" -F "Ignition ID=<Shapefile ID>" -F "Barrier ID=<Shapefile ID>" -F "Model Input=@<Input File>;type=text/plain"
Example Response
{"success":true,"queued":false,"includesWarningOrInfo":false,"multipleResponseMsgs":false,"msgCollector":null,"responseMessage":"Request to run a <Model Type> model was submitted - id <Run ID>","entityId":<Run ID>}
Request Body FLAM (FlamMap)
Name |
Type |
Required |
Description |
---|---|---|---|
Authorization |
String |
Required |
<Basic64 encoded username:API key> credentials of the User |
Model Type |
String |
Required |
<Model Type> name of the model to run: FLAM |
Model Input |
Text File |
Required |
<Input File> text file name that contains input and output parameters specific to the model |
Landscape ID |
Integer |
Required |
<GeoTIFF ID> assigned to the GeoTIFF, representing the landscape/fuelscape, uploaded to the FMSF |
Request Body MTT _ (MTT)
Name |
Type |
Required |
Description |
---|---|---|---|
Authorization |
String |
Required |
<Basic64 encoded username:API key> credentials of the User |
Model Type |
String |
Required |
<Model Type> name of the model to run: MTT_ |
Model Input |
Text File |
Required |
<Input File> text file name that contains input and output parameters specific to the model |
Landscape ID |
Integer |
Required |
<GeoTIFF ID> assigned to the GeoTIFF, representing the landscape/fuelscape, uploaded to the FMSF |
Ignition ID |
Integer |
Required |
<Shapefile ID> assigned to the shapefile uploaded to the FMSF |
Barrier ID |
Integer |
Optional |
<Shapefile ID> assigned to the shapefile uploaded to the FMSF |
Request Body RNDG (RANDIG)
Name |
Type |
Required |
Description |
---|---|---|---|
Authorization |
String |
Required |
<Basic64 encoded username:API key> credentials of the User |
Model Type |
String |
Required |
<Model Type> name of the model to run: RNDG |
Model Input |
Text File |
Required |
<Input File> text file name that contains input and output parameters specific to the model |
Landscape ID |
Integer |
Required |
<GeoTIFF ID> assigned to the GeoTIFF, representing the landscape/fuelscape, uploaded to the FMSF |
Request Body FSPR (FSPro)
Name |
Type |
Required |
Description |
---|---|---|---|
Authorization |
String |
Required |
<Basic64 encoded username:API key> credentials of the User |
Model Type |
String |
Required |
<Model Type> name of the model to run: FSPR |
Model Input |
Text File |
Required |
<Input File> text file name that contains input and output parameters specific to the model |
Landscape ID |
Integer |
Required |
<GeoTIFF ID> assigned to the GeoTIFF, representing the landscape/fuelscape, uploaded to the FMSF |
Ignition ID |
Integer |
Required |
<Shapefile ID> assigned to the shapefile uploaded to the FMSF |
Barrier ID |
Integer |
Optional |
<Shapefile ID> assigned to the shapefile uploaded to the FMSF |
Request Body FARS (FARSITE)
Name |
Type |
Required |
Description |
---|---|---|---|
Authorization |
String |
Required |
<Basic64 encoded username:API key> credentials of the User |
Model Type |
String |
Required |
<Model Type> name of the model to run: FARS |
Model Input |
Text File |
Required |
<Input File> text file name that contains input and output parameters specific to the model |
Landscape ID |
Integer |
Required |
<GeoTIFF ID> assigned to the GeoTIFF, representing the landscape/fuelscape, uploaded to the FMSF |
Ignition ID |
Integer |
Required |
<Shapefile ID> assigned to the shapefile uploaded to the FMSF |
Barrier ID |
Integer |
Optional |
<Shapefile ID> assigned to the shapefile uploaded to the FMSF |
Request Body FOFM (SpatialFOFEM Consumption and Emissions)
Name |
Type |
Required |
Description |
---|---|---|---|
Authorization |
String |
Required |
<Basic64 encoded username:API key> credentials of the User |
Model Type |
String |
Required |
<Model Type> name of the model to run: FOFM |
Model Input |
Text File |
Required |
<Input File> text file name that contains input and output parameters specific to the model |
Landscape ID |
Integer |
Required |
<GeoTIFF ID> assigned to the GeoTIFF, representing the FCCS fuelbeds, uploaded to the FMSF |
Request Body SFTM (SpatialFOFEM Tree Mortality)
Name |
Type |
Required |
Description |
---|---|---|---|
Authorization |
String |
Required |
<Basic64 encoded username:API key> credentials of the User |
Model Type |
String |
Required |
<Model Type> name of the model to run: SFTM |
Model Input |
Text File |
Required |
<Input File> text file name that contains input and output parameters specific to the model |
Landscape ID |
Integer |
Required |
<GeoTIFF ID> assigned to the GeoTIFF, representing the TreeMap treelist IDs, created in the FMSF |
Response Fields
Code 200 - OK
Name |
Type |
Description |
---|---|---|
success |
Boolean |
Status of model submission |
queued |
Boolean |
Model queued status |
includesWarningOrInfo |
Boolean |
Not used; will be deprecated |
multipleResponseMsgs |
Boolean |
Not used; will be deprecated |
msgCollector |
String |
Not used; will be deprecated |
responseMessage |
String |
Descriptive explanation of what occurred during the request |
entityId |
Integer |
<Run ID> assigned to the model run by the FMSF |
Code 400 – The request was unacceptable
Invalid model inputs provided
Code 401 – Unauthorized
Authorization info is missing or invalid
Code 500 – Server errors
Something went wrong on the FMSF end. Model input values not saved - server error